﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel;
using Jerrysjunglehuts.Models;

namespace Jerrysjunglehuts.Controllers
{
    public class HomeController : Controller
    {

        public ActionResult Index([DefaultValue("")]string value)
        {
            //ViewData["Message"] = value;
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";
            return View();
        }

        public ActionResult Magicalmoments()
        {
            return View();
        }

        [HttpPost]
        public ActionResult BookNow(BookingViewModel ob)
        {
            try
            {
                
                if (!ob.s_checkInDate.Equals("") && !ob.s_checkoutDate.Equals(""))
                {                   
                    Session["BookingData"] = ob;                   
                }
            }
            catch (Exception ex)
            {
            }
            
            return Json("{\"succeed\":true}", JsonRequestBehavior.AllowGet);   
        }
    }
}